<template>
	<view>
		<view class="hot" >
			<view class="title">床体安装</view>
			<view class="body">
				<view class="item">
					<view class="thumb-box" v-for="(item, index) in list" :key="index1" @click="detail(item)">
						<image class="item-menu-image" :src="item.icon" mode=""></image>
						<view class="item-menu-name margin-top-sm">{{item.name}}</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				list:[{
			"name": "床体安装",
			"key": "床体安装",
			"icon": "/static/img/category/anzhuan/chuangti.png",
			"cat": 6
		},
					{
			"name": "柜类安装",
			"key": "柜类安装",
			"icon": "/static/img/category/anzhuan/guilei.png",
			"cat": 6
		},
					{
			"name": "沙发安装",
			"key": "沙发安装",
			"icon": "/static/img/category/anzhuan/shafa.png",
			"cat": 6
		},
					{
			"name": "桌椅安装",
			"key": "桌椅安装",
			"icon": "/static/img/category/anzhuan/zhuoyi.png",
			"cat": 6
		},
				   {
			"name": "茶几安装",
			"key": "茶几安装",
			"icon": "/static/img/category/anzhuan/chaji.png",
			"cat": 6
		},
					{
			"name": "台案屏风",
			"key": "台案屏风",
			"icon": "/static/img/category/anzhuan/taian.png",
			"cat": 6
		},
	]
			}
		},
		methods: {
			detail(item){
				this.$u.route({
					url: 'pages/detail/detail',
					params: {
						icon:item.icon,
						name: item.name
					}
				})
			},
		}
	}
</script>

<style>
	page {
		background: #FFFFFF;
	}
</style>

<style lang="scss" scoped>
	.hot{
		.title {
		    font-size: 32rpx;
		    color: $u-main-color;
			margin: 30rpx 20rpx;
		}
		
		.body{
			.item {
				display: flex;
				flex-wrap: wrap;
			}
			
			.thumb-box {
				width: 33.333333%;
				display: flex;
				align-items: center;
				justify-content: center;
				flex-direction: column;
				margin-top: 20rpx;
				margin-bottom: 10rpx;
			}
			
			.item-menu-image {
				width: 120rpx;
				height: 120rpx;
				border-radius: 100rpx;
			}
		}
	}
</style>
